home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / csource.arc / SINGLEIO.C < prev    next >
C/C++ Source or Header  |  1988-02-01  |  377b  |  17 lines

  1.                                          /* Chapter 9 - Program 2 */
  2. #include <stdio.h>
  3.  
  4. main()
  5. {
  6. char c;
  7.  
  8.    printf("Enter any characters, terminate program with X\n");
  9.  
  10.    do {
  11.       c = getch();                     /* get a character */
  12.       putchar(c);                  /* display the hit key */
  13.    } while (c != 'X');
  14.  
  15.    printf("\nEnd of program.\n");
  16. }
  17.